package com.example.clxy.dao;

import com.example.clxy.entity.Announcement;
import com.example.clxy.result.business.AnnouncementResult;
import com.example.clxy.result.business.PageResult.AnnouncementPageResult;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AnnouncementMapper {
    int deleteByPrimaryKey(String announcementid);

    int insert(Announcement record);

    int insertSelective(Announcement record);

    AnnouncementResult getAnnouncementbyid(String announcementid);

    int updateByPrimaryKeySelective(Announcement record);

    int updateByPrimaryKey(Announcement announcementid);

    List<AnnouncementPageResult> getAnnouncementList(@Param("title") String title,
                                                     @Param("begin")int begin,
                                                     @Param("end")int end,
                                                     @Param("pagesize")int pagesize);


    List<AnnouncementPageResult> getNewsList(@Param("title") String title,
                                             @Param("begin")int begin,
                                             @Param("end")int end,
                                             @Param("pagesize")int pagesize);




    int deleteAnnouncement(String announcementid);

}